﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="ListaCategorias.aspx.cs" Inherits="WebApplication1.ListaCategorias" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            font-size: medium;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <strong><span class="style1">Lista de Categorias</span></strong><br />
    <br />
    <asp:DataList ID="MyDataList" RepeatColumns="1" RepeatDirection="Vertical" runat="server"
        Width="100%" OnItemDataBound="MyDataList_ItemDataBound">
        <%-- Create a DataList control template named "ItemTemplate". --%>
        <ItemTemplate>
            <div style="padding-bottom: 10px; font-size: 10pt; font-family: Verdana;">
                <asp:Label runat="server" ID="CategoriaPai" Text='<%# DataBinder.Eval(Container.DataItem,"nome") %>'></asp:Label>
                <asp:DataList ID="SubDataList" RepeatColumns="1" RepeatDirection="Vertical" runat="server"
                    Width="100%">
                    <%-- Create a DataList control template named "ItemTemplate". --%>
                    <ItemTemplate>
                        <div style="padding-left: 30px; font-size: 10pt; font-family: Verdana;">
                            <asp:LinkButton runat="server" ID="XXX" Text='<%# DataBinder.Eval(Container.DataItem,"nome") %>'
                                OnClick="XXX_Click" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"id") %>'></asp:LinkButton>
                        </div>
                    </ItemTemplate>
                </asp:DataList>
            </div>
        </ItemTemplate>
    </asp:DataList>
</asp:Content>
